home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / shu194st.zoo / shellutils-1.9.4 / src / Makefile < prev    next >
Encoding:
Makefile  |  1994-03-16  |  6.1 KB  |  224 lines

  1. # Generated automatically from Makefile.in by configure.
  2. # Makefile for GNU shell utilities programs.
  3. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. SHELL = /bin/sh
  20.  
  21. srcdir = .
  22. VPATH = .
  23.  
  24. prefix = /usr/local
  25. exec_prefix = $(prefix)
  26. bindir = $(exec_prefix)/bin
  27. binprefix = 
  28.  
  29. INSTALL = /usr/local/bin/install -c
  30. INSTALL_PROGRAM = $(INSTALL)
  31. CC = gcc
  32. DEFS = -DCONFIG_BROKETS -DHAVE_CONFIG_H
  33. LIBS =  -lufc
  34. CFLAGS = -O2 -mpcrel -fomit-frame-pointer
  35. LDFLAGS = 
  36.  
  37. SOURCES = basename.c date.c dirname.c echo.c env.c expr.c id.c logname.c \
  38. long-options.c pathchk.c printenv.c printf.c sleep.c su.c tee.c test.c tty.c \
  39. who.c whoami.c yes.c nice.c stty.c uname.c version.c
  40.  
  41. OBJECTS = basename.o date.o dirname.o echo.o env.o expr.o id.o logname.o \
  42. long-options.o pathchk.o printenv.o printf.o sleep.o su.o tee.o test.o tty.o \
  43. who.o whoami.o yes.o nice.o stty.o uname.o version.o
  44.  
  45. DISTFILES = Makefile.in system.h $(SOURCES) groups.sh nohup.sh \
  46. false.sh true.sh version.h long-options.h
  47.  
  48. PROGS = basename date dirname echo env expr false groups id logname \
  49. pathchk printenv printf sleep tee test true tty who whoami yes  uname nice nohup stty
  50.  
  51. all: $(PROGS) su
  52.  
  53. incl = -I.. -I$(srcdir) -I$(srcdir)/../lib
  54. .c.o:
  55.     $(CC) -c $(CPPFLAGS) $(DEFS) $(incl) $(CFLAGS) $<
  56.  
  57. install: all
  58.     for f in $(PROGS); do \
  59.         $(INSTALL_PROGRAM) $$f $(bindir)/$(binprefix)$$f; \
  60.     done
  61.     rm -f $(bindir)/'['; ln $(bindir)/$(binprefix)test $(bindir)/'['
  62.     @if test `./id -u` = 0; then \
  63.     echo you are root, so installing su; \
  64.     $(INSTALL_PROGRAM) su $(bindir)/$(binprefix)su; \
  65.     chown root $(bindir)/$(binprefix)su; \
  66.     chmod 4755 $(bindir)/$(binprefix)su; \
  67.     else echo WARNING: you are not root, so not installing su; fi
  68.  
  69. uninstall:
  70.     for f in $(PROGS) su; do rm -f $(bindir)/$(binprefix)$$f; done
  71.     rm -f $(bindir)/'['
  72.  
  73. TAGS: $(SOURCES)
  74.     etags $(SOURCES)
  75.  
  76. check:
  77.  
  78. clean:
  79.     rm -f $(PROGS) su *.o core '[' .version
  80.  
  81. mostlyclean: clean
  82.  
  83. distclean: clean
  84.     rm -f Makefile
  85.  
  86. realclean: distclean
  87.     rm -f TAGS
  88.  
  89. dist: $(DISTFILES)
  90.     ln $(DISTFILES) ../`cat ../.fname`/src
  91.  
  92. .version: version.c
  93.     sed -e '/version_string/!d' \
  94.         -e 's/[^"]*"\([^"]*\)".*/\1/' \
  95.         -e q $(srcdir)/version.c \
  96.       > $@-t
  97.     mv $@-t $@
  98.  
  99. $(PROGS) su: ../lib/libshu.a version.o
  100. link_command = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
  101.  
  102. basename: basename.o long-options.o
  103.     $(link_command) basename.o long-options.o \
  104.         ../lib/libshu.a version.o $(LIBS)
  105.  
  106. date: date.o
  107.     $(link_command) date.o ../lib/libshu.a version.o $(LIBS)
  108.  
  109. dirname: dirname.o long-options.o
  110.     $(link_command) dirname.o long-options.o \
  111.         ../lib/libshu.a version.o $(LIBS)
  112.  
  113. echo: echo.o long-options.o
  114.     $(link_command) echo.o long-options.o ../lib/libshu.a version.o $(LIBS)
  115.  
  116. env: env.o
  117.     $(link_command) env.o ../lib/libshu.a version.o $(LIBS)
  118.  
  119. expr: expr.o long-options.o
  120.     $(link_command) expr.o long-options.o ../lib/libshu.a version.o $(LIBS)
  121.  
  122. false: false.sh .version
  123.     rm -f $@ $@-t
  124.     sed -e "s/@VERSION@/`cat .version`/" $(srcdir)/false.sh \
  125.         > $@-t
  126.     mv $@-t $@
  127.     chmod +x $@
  128.  
  129. id: id.o
  130.     $(link_command) id.o ../lib/libshu.a version.o $(LIBS)
  131.  
  132. groups: groups.sh .version
  133.     rm -f $@ $@-t
  134.     sed -e "s,@bindir@,$(bindir),g" \
  135.         -e "s/@VERSION@/`cat .version`/" $(srcdir)/groups.sh \
  136.         > $@-t
  137.     mv $@-t $@
  138.     chmod +x $@
  139.  
  140. logname: logname.o
  141.     $(link_command) logname.o ../lib/libshu.a version.o $(LIBS)
  142.  
  143. nohup: nohup.sh .version
  144.     rm -f $@ $@-t
  145.     sed -e "s,@bindir@,$(bindir),g" \
  146.         -e "s/@VERSION@/`cat .version`/" $(srcdir)/nohup.sh \
  147.         > $@-t
  148.     mv $@-t $@
  149.     chmod +x $@
  150.  
  151. pathchk: pathchk.o
  152.     $(link_command) pathchk.o ../lib/libshu.a version.o $(LIBS)
  153.  
  154. printenv: printenv.o
  155.     $(link_command) printenv.o ../lib/libshu.a version.o $(LIBS)
  156.  
  157. # Link with -lm in case strtod.o needs to get `pow'.
  158. printf: printf.o long-options.o
  159.     $(link_command) printf.o long-options.o ../lib/libshu.a version.o $(LIBS) -lm
  160.  
  161. sleep: sleep.o
  162.     $(link_command) sleep.o ../lib/libshu.a version.o $(LIBS)
  163.  
  164. su: su.o
  165.     $(link_command) su.o ../lib/libshu.a version.o $(LIBS)
  166.  
  167. tee: tee.o
  168.     $(link_command) tee.o ../lib/libshu.a version.o $(LIBS)
  169.  
  170. test: test.o long-options.o
  171.     $(link_command) test.o long-options.o ../lib/libshu.a version.o $(LIBS)
  172.  
  173. true: true.sh .version
  174.     rm -f $@ $@-t
  175.     sed -e "s/@VERSION@/`cat .version`/" $(srcdir)/true.sh \
  176.         > $@-t
  177.     mv $@-t $@
  178.     chmod +x $@
  179.  
  180. tty: tty.o
  181.     $(link_command) tty.o ../lib/libshu.a version.o $(LIBS)
  182.  
  183. who: who.o
  184.     $(link_command) who.o ../lib/libshu.a version.o $(LIBS)
  185.  
  186. whoami: whoami.o
  187.     $(link_command) whoami.o ../lib/libshu.a version.o $(LIBS)
  188.  
  189. yes: yes.o long-options.o
  190.     $(link_command) yes.o long-options.o ../lib/libshu.a version.o $(LIBS)
  191.  
  192. nice: nice.o
  193.     $(link_command) nice.o ../lib/libshu.a version.o $(LIBS)
  194.  
  195. stty: stty.o long-options.o
  196.     $(link_command) stty.o long-options.o ../lib/libshu.a version.o $(LIBS)
  197.  
  198. uname: uname.o
  199.     $(link_command) uname.o ../lib/libshu.a version.o $(LIBS)
  200.  
  201. # Special rules for some .o files.
  202.  
  203. su.o: su.c
  204.     $(CC) -c $(CPPFLAGS) -DSYSLOG_FAILURE -DSYSLOG_SUCCESS $(DEFS) \
  205.         $(incl) $(CFLAGS) $(srcdir)/su.c
  206.  
  207. test.o: test.c
  208.     $(CC) -c $(CPPFLAGS) -DTEST_STANDALONE $(DEFS) \
  209.         $(incl) $(CFLAGS) $(srcdir)/test.c
  210.  
  211. env.o id.o nice.o pathchk.o stty.o su.o tty.o uname.o who.o: ../lib/getopt.h
  212. expr.o: ../lib/regex.h
  213.  
  214. # Make all .o files depend on these files even though there are a few
  215. # unnecessary dependencies.
  216. $(OBJECTS): ../config.h system.h version.h
  217. echo.o expr.o printf.o test.o yes.o: long-options.h
  218. basename.o dirname.o stty.o: long-options.h
  219. long-options.o: long-options.h
  220.  
  221. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  222. # Otherwise a system limit (for SysV at least) may be exceeded.
  223. .NOEXPORT:
  224.